//
//  UserInfo.m
//  YiHaoXian
//
//  Created by Shine on 15/4/27.
//  Copyright (c) 2015年 unshu.com. All rights reserved.
//

#import "UserInfo.h"

@implementation UserInfo

- (id)init{
    self = [super init];
    if(self)
    {
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:self.token forKey:@"token"];
    [aCoder encodeObject:self.userID forKey:@"userID"];
    [aCoder encodeObject:self.nickName forKey:@"nickName"];
    [aCoder encodeObject:self.companyName forKey:@"companyName"];
    [aCoder encodeObject:self.phone forKey:@"phone"];
    [aCoder encodeObject:self.gender forKey:@"gender"];
    [aCoder encodeObject:self.companyAddress forKey:@"companyAddress"];
    [aCoder encodeObject:self.realName forKey:@"realName"];
    [aCoder encodeInteger:self.authenticationType forKey:@"authenticationType"];
}


- (id)initWithCoder:(NSCoder *)aDecoder {
    self = [super init];
    if (self) {
        self.token = [aDecoder decodeObjectForKey:@"token"];
        self.userID = [aDecoder decodeObjectForKey:@"userID"];
        self.nickName = [aDecoder decodeObjectForKey:@"nickName"];
        self.realName = [aDecoder decodeObjectForKey:@"realName"];
        self.companyName = [aDecoder decodeObjectForKey:@"companyName"];
        self.phone = [aDecoder decodeObjectForKey:@"phone"];
        self.gender = [aDecoder decodeObjectForKey:@"gender"];
        self.companyAddress = [aDecoder decodeObjectForKey:@"companyAddress"];
        self.authenticationType = [aDecoder decodeIntegerForKey:@"authenticationType"];
    }
    return self;
}

@end
